//
//  JDOrderDetailModel.swift
//  DragonWallet
//
//  Created by volantPig on 2024/8/20.
//

import UIKit
import HandyJSON

class JDOrderDetailModel: HandyJSON {

//    "orderTime": "2025-04-09 23:25:24",
    
//    "finishTime": "2025-04-09 23:30:54",
//    "payTime": "2025-04-09 23:25:35",
//    "deliveryTime": null,
//    "arrivalTime": null,
    
    /// 收货时间呗
    var finishTime: String?
    /// 支付时间
    var payTime: String?
    /// 发货时间
    var deliveryTime: String?
    /// 到货时间
    var arrivalTime: String?
    
    var id: String?
    // 下单时间呗
    var orderTime: String?
    var totalAmount: String?
    var customerServicePhone: String?
    var mobile: String?
    var province: String?
    var freight: Int?
    var buyerName: String?
    var orderNo: String?
    var receiverName: String?
    var address: String?
//    1:"买家待付款"
//    2:"未付款自动取消"
//    3:"已付款(待接单)"
//    4:"买家手动取消"
//    5:"商家已接单"
//    6:"商家已拒单"
//    7:"商家已发货"
//    8:"物流已到货"
//    9:"买家确认收货"
    var orderStatus: String?
    var city: String?
    var district: String?
    var postal: String?
    var tariff: String?
    var userMessage: String?
    var goodsList: [JDOrderDetailGoodsModel]?
    var buyerIdCardNumber: String?
    /// 接单时间  废弃
    var acceptOrderTime: String?
    /// 快递单号
    var deliveryNo: String?
//    {
//        "id":12,
//        "orderTime":"2024-08-20 13:33:48",
//        "totalAmount":150000,
//        "customerServicePhone":"0411-87979988",
//        "mobile":"13284231123",
//        "province":"辽宁省",
//        "freight":7500,
//        "buyerName":"朱",
//        "orderNo":"JDCB1724132028350",
//        "receiverName":"朱",
//        "address":"华北路大湾市场",
//        "orderStatus":1,
//        "city":"大连市",
//        "district":"甘井子区",
//        "postal":"116000",
//        "tariff":13500,
//        "userMessage":"789",
//        "goodsList":[],
//        "buyerIdCardNumber":"456"
//
//    }
    // 拒单原因
    var refusedReason: String?
    // 增值税（金额）
    var orderAddedTariff: Int?
    // 消费税（金额）
    var orderConsumptionTariff: Int?
    
    required init() { }
}

class JDOrderDetailGoodsModel : HandyJSON {
    
    
    var origin: String?
    var specificationName: String?
    var goodsSpecificationNameList: [String]?
    var goodsName: String?
    var goodsId: String?
    var goodsSpecificationIdList: [String]?
    var goodsBrand: String?
    var goodsPriceText: String?
    var goodsMainImageUrl:  String?
    var goodsSkuId: String?
    // 预订单页面用  确认订单页面
    var salePrice: String?
    // 订单详情用
    var goodsPrice: String?
    var goodsCount: String?
    // 新增
    var acceptOrderTime: String?
    // 商品增值税（金额
    var addedTariff: Int?
    // 商品消费税（金额
    var consumptionTariff: Int?
    
    var addedTariffText: String?
    
    var consumptionTariffText: String?
    
//    var salePrice: Int?
    
//    {
//        "origin":"日本",
//        "goodsSpecificationNameList":["黑色","S码"],
//        "goodsName":"黑眼镜",
//        "goodsId":1,
//        "goodsSpecificationIdList":[1,6],
//        "goodsBrand":"上下一白",
//        "goodsPriceText":"1950.00",
//        "goodsMainImageUrl":"https:\/\/img11.360buyimg.com\/n1\/s450x450_jfs\/t1\/54403\/16\/24313\/48223\/669b4cd9F1f1e51e2\/91cdf0091dec0c68.jpg",
//        "goodsSkuId":1,
//        "goodsPrice":150000,
//        "goodsCount":13
//    }
    
    required init() { }
}



//{
//    "code": "0",
//    "success": true,
//    "message": "OK",
//    "data": {
//        "goodsList": [{
//            "goodsPrice": 18000,
//            "goodsSkuId": 32,
//            "specificationName": "紫，256G",
//            "goodsBrand": "回音岛",
//            "goodsSpecificationNameList": [],
//            "goodsCount": 1,
//            "acceptOrderTime": null,
//            "goodsPriceText": "18.00",
//            "goodsMainImageUrl": "94ed489822a94c5a4fc943be982901b13545871231915247b511dffeca675789",
//            "goodsSpecificationIdList": [],
//            "goodsName": "ceshi",
//            "origin": "艾泽拉斯",
//            "goodsId": 23
//        }],
//        "payTime": "2025-04-09 23:25:35",
//        "tariff": 1620,
//        "orderStatus": 5,
//        "arrivalTime": null,
//        "province": "北京市",
//        "district": "东城区",
//        "shopName": "4月7日新建测试商户",
//        "orderType": null,
//        "city": "北京市",
//        "buyerName": "关超",
//        "postal": "116000",
//        "userMessage": "",
//        "id": 191,
//        "orderNo": "JDCB1744212323962",
//        "deliveryTime": null,
//        "freight": 1160,
//        "deliveryNo": null,
//        "receiverName": "666",
//        "mobile": "15041702096",
//        "customerServicePhone": "0411-87979988",
//        "totalAmount": 20780,
//        "orderTime": "2025-04-09 23:25:24",
//        "finishTime": "2025-04-09 23:30:54",
//        "buyerIdCardNumber": "210282********0917",
//        "address": "还没有啊"
//    }
//}


